CODE_ROOT = $(shell cd ../../; pwd)
include $(CODE_ROOT)/Rules.make

INCLUDES= -I../../include/

SRC = $(wildcard *.cpp)
OBJS := $(patsubst %.cpp, %.o, $(SRC))

SUBDIR  = time

TARGET = libss_time.a

CXXFLAGS += $(INCLUDES)

all: $(OBJS) $(TARGET) 
	@if [ ! -d ../../include/$(SUBDIR)/ ]; then \
	mkdir ../../include/$(SUBDIR)/; \
	fi
	cp -f *.h ../../include/$(SUBDIR)/
	cp -f $(TARGET) ../../lib/

$(TARGET): $(OBJS)
	ar -crs $@ $^
	
clean:
	rm -rf $(OBJS) $(TARGET)
	rm -rf ../../include/$(SUBDIR)/*.*
	rm -rf ../../lib/$(TARGET)
